 package com.oanda.blackberry.util;
 
 import java.util.Vector;
 
 public class PropertyChangeSupport
 {
   Vector listeners = new Vector();
   Object source;
 
   public PropertyChangeSupport()
   {
   }
 
   public PropertyChangeSupport(Object source)
   {
     this.source = source;
   }
 
   public void addPropertyChangeListener(PropertyChangeListener listener) {
     this.listeners.addElement(listener);
   }
 
   public void removePropertyChangeListener(PropertyChangeListener listener) {
     this.listeners.removeElement(listener);
   }
 
   public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
     for (int i = 0; i < this.listeners.size(); i++) {
       PropertyChangeListener lis = (PropertyChangeListener)this.listeners.elementAt(i);
       lis.propertyChange(new PropertyChangeEvent(null, propertyName, oldValue, newValue));
     }
   }
}

